﻿using Bootstrap.DataAccess;
using Bootstrap.DataAccess.Model;
using Bootstrap.Security;
using Longbow.Web.Mvc;
using System;
using System.Linq;

namespace Bootstrap.Admin.Query
{
    /// <summary>
    /// 呼叫统计
    /// </summary>
    public class QueryCallResultStatisticOption : PaginationOption
    {
      
        /// <summary>
        /// 开始日期
        /// </summary>
        public DateTime? BeginDate { get; set; }

        /// <summary>
        /// 结束日期
        /// </summary>
        public DateTime? EndDate { get; set; }
      


        /// <summary>
        /// 
        /// </summary>
        /// <returns></returns>
        public QueryData<CallResultStatistic> RetrieveData()
        {
            var data = CallResultStatisticHelper.RetrievePages(this, BeginDate, EndDate);
            var ret = new QueryData<CallResultStatistic>();
            ret.total = data.TotalItems;
            ret.rows = data.Items;
            return ret;
        }

      
    }
}
